﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed
#pragma once

#include "GcmpModelInterface.h"
#include "NdbObjectSchematic.h"
#include "INoElementIdDbObject.h"
#include "DbDataSchema.h"


namespace gcmp {

    
    class IModelView;
    class IElement;
    class ElementId;
    /// \brief UI操纵器组件接口
    ///
    /// Element具有辅助对象时需要重写此接口
    class GCMP_MODEL_INTERFACE_EXPORT IElementUiManipulatorComponent : public INoElementIdDbObject
    {
        DEFINE_CAST_DERIVED(gcmp::IElementUiManipulatorComponent, gcmp::INoElementIdDbObject)
    public:
        /// \brief 创建一个默认的UI操纵器组件
        ///
        /// 包含常用有关辅助对象的方法
        /// \param pElement 默认组件所属的Element
        /// \return OwnerPtr<IElementUiManipulatorComponent> UI操纵器组件
        static OwnerPtr<IElementUiManipulatorComponent> CreateNoUiManipulatorComponent();
        /// \brief 创建一个空的的UI操纵器组件
        ///
        /// 不包含常用有关辅助对象的方法
        /// \param pElement 空组件所属的Element
        /// \return OwnerPtr<IElementUiManipulatorComponent> UI操纵器组件
        static OwnerPtr<IElementUiManipulatorComponent> CreateNullUiManipulatorComponent();

        /// \brief 创建辅助对象
        /// \param pModelView 当前视图，创建辅助对象时若不需要视图信息可传入空
        /// \return void
        virtual std::vector<ElementId> CreateAuxiliaryElements(gcmp::IModelView* pModelView) const = 0;
    };
}// namespace gcmp


